<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        // charAt()   通过下标访问字符串中的字符    
        // charCodeAt()   通过下标访问字符串对应的字符的ASCII

        // String.fromCharCode()   把ASCII值转成对应的字符


        var str = 'hi' ;
        // console.log(str[0]) ;
        console.log(str.charAt(0)) ;

        console.log(str.charCodeAt(0)) ;

        console.log(String.fromCharCode(104)) ;



        // a-z
        var smallArr = [] ;
        for(var i = 97 ; i <= 122 ; i++) {
            var s = String.fromCharCode(i) ;
            smallArr.push(s) ;
        }
        console.log(smallArr);

        var bigArr = [] ;
        for(var i = 65 ; i <= 90 ; i++) {
            var s = String.fromCharCode(i) ;
            bigArr.push(s) ;
        }
        console.log(bigArr);


        var numArr = [] ;
        for(var i = 0 ; i < 10 ; i++) {
            numArr.push(i + '') ;
        }
        console.log(numArr);


        var allArr = smallArr.concat(bigArr , numArr);

        console.log(allArr);

    </script>
    
</body>
</html>